/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    ap-northeast-1 = 'ltl.aliyuncs.com',
    ap-northeast-2-pop = 'ltl.aliyuncs.com',
    ap-south-1 = 'ltl.aliyuncs.com',
    ap-southeast-1 = 'ltl.aliyuncs.com',
    ap-southeast-2 = 'ltl.aliyuncs.com',
    ap-southeast-3 = 'ltl.aliyuncs.com',
    ap-southeast-5 = 'ltl.aliyuncs.com',
    cn-beijing = 'ltl.aliyuncs.com',
    cn-beijing-finance-1 = 'ltl.aliyuncs.com',
    cn-beijing-finance-pop = 'ltl.aliyuncs.com',
    cn-beijing-gov-1 = 'ltl.aliyuncs.com',
    cn-beijing-nu16-b01 = 'ltl.aliyuncs.com',
    cn-chengdu = 'ltl.aliyuncs.com',
    cn-edge-1 = 'ltl.aliyuncs.com',
    cn-fujian = 'ltl.aliyuncs.com',
    cn-haidian-cm12-c01 = 'ltl.aliyuncs.com',
    cn-hangzhou-bj-b01 = 'ltl.aliyuncs.com',
    cn-hangzhou-finance = 'ltl.aliyuncs.com',
    cn-hangzhou-internal-prod-1 = 'ltl.aliyuncs.com',
    cn-hangzhou-internal-test-1 = 'ltl.aliyuncs.com',
    cn-hangzhou-internal-test-2 = 'ltl.aliyuncs.com',
    cn-hangzhou-internal-test-3 = 'ltl.aliyuncs.com',
    cn-hangzhou-test-306 = 'ltl.aliyuncs.com',
    cn-hongkong = 'ltl.aliyuncs.com',
    cn-hongkong-finance-pop = 'ltl.aliyuncs.com',
    cn-huhehaote = 'ltl.aliyuncs.com',
    cn-huhehaote-nebula-1 = 'ltl.aliyuncs.com',
    cn-north-2-gov-1 = 'ltl.aliyuncs.com',
    cn-qingdao = 'ltl.aliyuncs.com',
    cn-qingdao-nebula = 'ltl.aliyuncs.com',
    cn-shanghai-et15-b01 = 'ltl.aliyuncs.com',
    cn-shanghai-et2-b01 = 'ltl.aliyuncs.com',
    cn-shanghai-finance-1 = 'ltl.aliyuncs.com',
    cn-shanghai-inner = 'ltl.aliyuncs.com',
    cn-shanghai-internal-test-1 = 'ltl.aliyuncs.com',
    cn-shenzhen = 'ltl.aliyuncs.com',
    cn-shenzhen-finance-1 = 'ltl.aliyuncs.com',
    cn-shenzhen-inner = 'ltl.aliyuncs.com',
    cn-shenzhen-st4-d01 = 'ltl.aliyuncs.com',
    cn-shenzhen-su18-b01 = 'ltl.aliyuncs.com',
    cn-wuhan = 'ltl.aliyuncs.com',
    cn-wulanchabu = 'ltl.aliyuncs.com',
    cn-yushanfang = 'ltl.aliyuncs.com',
    cn-zhangbei = 'ltl.aliyuncs.com',
    cn-zhangbei-na61-b01 = 'ltl.aliyuncs.com',
    cn-zhangjiakou = 'ltl.aliyuncs.com',
    cn-zhangjiakou-na62-a01 = 'ltl.aliyuncs.com',
    cn-zhengzhou-nebula-1 = 'ltl.aliyuncs.com',
    eu-central-1 = 'ltl.aliyuncs.com',
    eu-west-1 = 'ltl.aliyuncs.com',
    eu-west-1-oxs = 'ltl.aliyuncs.com',
    me-east-1 = 'ltl.aliyuncs.com',
    rus-west-1-pop = 'ltl.aliyuncs.com',
    us-east-1 = 'ltl.aliyuncs.com',
    us-west-1 = 'ltl.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('ltl', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model ApplyDataModelConfigInfoRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  configuration?: string(name='Configuration', example='{\\"productKey\\":\\"a1lPbm9Yq0v\\"}'),
  dataModelCode?: string(name='DataModelCode', example='DF3K'),
  productKey?: string(name='ProductKey', example='HB5jyvZWz******g'),
}

model ApplyDataModelConfigInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='180E5D71-FF24-5E87-9746-3DA837E686FE'),
  success?: boolean(name='Success', example='true'),
}

model ApplyDataModelConfigInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ApplyDataModelConfigInfoResponseBody(name='body'),
}

async function applyDataModelConfigInfoWithOptions(request: ApplyDataModelConfigInfoRequest, runtime: Util.RuntimeOptions): ApplyDataModelConfigInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.configuration)) {
    query['Configuration'] = request.configuration;
  }
  if (!Util.isUnset(request.dataModelCode)) {
    query['DataModelCode'] = request.dataModelCode;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ApplyDataModelConfigInfo',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function applyDataModelConfigInfo(request: ApplyDataModelConfigInfoRequest): ApplyDataModelConfigInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyDataModelConfigInfoWithOptions(request, runtime);
}

model AttachDataRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  businessId?: string(name='BusinessId', example='000000000000000000000000000000000000000000000000000000000001****'),
  key?: string(name='Key', example='0001_HB5jyvZWzwcM****_0X**_80aa976ac4d64a97bd45c71a509d****'),
  productKey?: string(name='ProductKey', example='HB5jyvZWzwcM****'),
  value?: string(name='Value'),
}

model AttachDataResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model AttachDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AttachDataResponseBody(name='body'),
}

async function attachDataWithOptions(request: AttachDataRequest, runtime: Util.RuntimeOptions): AttachDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.businessId)) {
    query['BusinessId'] = request.businessId;
  }
  if (!Util.isUnset(request.key)) {
    query['Key'] = request.key;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }
  if (!Util.isUnset(request.value)) {
    query['Value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AttachData',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function attachData(request: AttachDataRequest): AttachDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return attachDataWithOptions(request, runtime);
}

model AttachDataWithSignatureRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  businessId?: string(name='BusinessId', example='000000000000000000000000000000000000000000000000000000000001****'),
  iotAuthType?: string(name='IotAuthType', example='ID2'),
  iotDataDigest?: string(name='IotDataDigest', example='94894989498FDDABD51698BD1A49BF1AFB0AA94FAA8DB65A689164BEED******'),
  iotId?: string(name='IotId', example='183329761572****'),
  iotIdServiceProvider?: string(name='IotIdServiceProvider', example='g9R4ghe****'),
  iotIdSource?: string(name='IotIdSource', example='2'),
  iotSignature?: string(name='IotSignature', example='2~2~192ADFB498AA****~1579198300000~J8E891NAgAhwHBHm8******/hnswr698HSb09ahS8709bn9s03jg98u4jg******'),
  key?: string(name='Key', example='0001_HB5jyvZWzwcM****_0X**_80aa976ac4d64a97bd45c71a509d****'),
  productKey?: string(name='ProductKey', example='HB5jyvZWzwcM****'),
  value?: string(name='Value'),
}

model AttachDataWithSignatureResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model AttachDataWithSignatureResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AttachDataWithSignatureResponseBody(name='body'),
}

async function attachDataWithSignatureWithOptions(request: AttachDataWithSignatureRequest, runtime: Util.RuntimeOptions): AttachDataWithSignatureResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.businessId)) {
    query['BusinessId'] = request.businessId;
  }
  if (!Util.isUnset(request.iotAuthType)) {
    query['IotAuthType'] = request.iotAuthType;
  }
  if (!Util.isUnset(request.iotDataDigest)) {
    query['IotDataDigest'] = request.iotDataDigest;
  }
  if (!Util.isUnset(request.iotId)) {
    query['IotId'] = request.iotId;
  }
  if (!Util.isUnset(request.iotIdServiceProvider)) {
    query['IotIdServiceProvider'] = request.iotIdServiceProvider;
  }
  if (!Util.isUnset(request.iotIdSource)) {
    query['IotIdSource'] = request.iotIdSource;
  }
  if (!Util.isUnset(request.iotSignature)) {
    query['IotSignature'] = request.iotSignature;
  }
  if (!Util.isUnset(request.key)) {
    query['Key'] = request.key;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }
  if (!Util.isUnset(request.value)) {
    query['Value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AttachDataWithSignature',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function attachDataWithSignature(request: AttachDataWithSignatureRequest): AttachDataWithSignatureResponse {
  var runtime = new Util.RuntimeOptions{};
  return attachDataWithSignatureWithOptions(request, runtime);
}

model AuthorizeDeviceRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  deviceGroupId?: string(name='DeviceGroupId', example='475020454741****'),
  deviceId?: string(name='DeviceId', example='654887879557****'),
}

model AuthorizeDeviceResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model AuthorizeDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AuthorizeDeviceResponseBody(name='body'),
}

async function authorizeDeviceWithOptions(request: AuthorizeDeviceRequest, runtime: Util.RuntimeOptions): AuthorizeDeviceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.deviceGroupId)) {
    query['DeviceGroupId'] = request.deviceGroupId;
  }
  if (!Util.isUnset(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AuthorizeDevice',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function authorizeDevice(request: AuthorizeDeviceRequest): AuthorizeDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return authorizeDeviceWithOptions(request, runtime);
}

model AuthorizeDeviceGroupRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  deviceGroupId?: string(name='DeviceGroupId', example='475020454741****'),
}

model AuthorizeDeviceGroupResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model AuthorizeDeviceGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AuthorizeDeviceGroupResponseBody(name='body'),
}

async function authorizeDeviceGroupWithOptions(request: AuthorizeDeviceGroupRequest, runtime: Util.RuntimeOptions): AuthorizeDeviceGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.deviceGroupId)) {
    query['DeviceGroupId'] = request.deviceGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AuthorizeDeviceGroup',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function authorizeDeviceGroup(request: AuthorizeDeviceGroupRequest): AuthorizeDeviceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return authorizeDeviceGroupWithOptions(request, runtime);
}

model BatchUploadMPCoSPhaseDigestInfoRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  phaseDataList?: map[string]any(name='PhaseDataList'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
  phaseId?: string(name='PhaseId', example='644208887511****'),
}

model BatchUploadMPCoSPhaseDigestInfoShrinkRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  phaseDataListShrink?: string(name='PhaseDataList'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
  phaseId?: string(name='PhaseId', example='644208887511****'),
}

model BatchUploadMPCoSPhaseDigestInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model BatchUploadMPCoSPhaseDigestInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BatchUploadMPCoSPhaseDigestInfoResponseBody(name='body'),
}

async function batchUploadMPCoSPhaseDigestInfoWithOptions(tmpReq: BatchUploadMPCoSPhaseDigestInfoRequest, runtime: Util.RuntimeOptions): BatchUploadMPCoSPhaseDigestInfoResponse {
  Util.validateModel(tmpReq);
  var request = new BatchUploadMPCoSPhaseDigestInfoShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.phaseDataList)) {
    request.phaseDataListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.phaseDataList, 'PhaseDataList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.phaseDataListShrink)) {
    query['PhaseDataList'] = request.phaseDataListShrink;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  if (!Util.isUnset(request.phaseId)) {
    query['PhaseId'] = request.phaseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BatchUploadMPCoSPhaseDigestInfo',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function batchUploadMPCoSPhaseDigestInfo(request: BatchUploadMPCoSPhaseDigestInfoRequest): BatchUploadMPCoSPhaseDigestInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchUploadMPCoSPhaseDigestInfoWithOptions(request, runtime);
}

model BatchUploadMPCoSPhaseDigestInfoByDeviceRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  iotAuthType?: string(name='IotAuthType', example='ID2'),
  iotDataDigest?: string(name='IotDataDigest', example='94894989498FDDABD51698BD1A49BF1AFB0AA94FAA8DB65A689164BEED'),
  iotId?: string(name='IotId', example='183329761572****'),
  iotIdServiceProvider?: string(name='IotIdServiceProvider', example='g9R4ghe****'),
  iotIdSource?: string(name='IotIdSource', example='2'),
  iotSignature?: string(name='IotSignature', example='2~2~192ADFB498AA****~1579198300000~J8E891NAgAhwHBHm8******/hnswr698HSb09ahS8709bn9s03jg98u4jg******'),
  phaseDataList?: map[string]any(name='PhaseDataList'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
  phaseId?: string(name='PhaseId', example='644208887511****'),
}

model BatchUploadMPCoSPhaseDigestInfoByDeviceShrinkRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  iotAuthType?: string(name='IotAuthType', example='ID2'),
  iotDataDigest?: string(name='IotDataDigest', example='94894989498FDDABD51698BD1A49BF1AFB0AA94FAA8DB65A689164BEED'),
  iotId?: string(name='IotId', example='183329761572****'),
  iotIdServiceProvider?: string(name='IotIdServiceProvider', example='g9R4ghe****'),
  iotIdSource?: string(name='IotIdSource', example='2'),
  iotSignature?: string(name='IotSignature', example='2~2~192ADFB498AA****~1579198300000~J8E891NAgAhwHBHm8******/hnswr698HSb09ahS8709bn9s03jg98u4jg******'),
  phaseDataListShrink?: string(name='PhaseDataList'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
  phaseId?: string(name='PhaseId', example='644208887511****'),
}

model BatchUploadMPCoSPhaseDigestInfoByDeviceResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model BatchUploadMPCoSPhaseDigestInfoByDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BatchUploadMPCoSPhaseDigestInfoByDeviceResponseBody(name='body'),
}

async function batchUploadMPCoSPhaseDigestInfoByDeviceWithOptions(tmpReq: BatchUploadMPCoSPhaseDigestInfoByDeviceRequest, runtime: Util.RuntimeOptions): BatchUploadMPCoSPhaseDigestInfoByDeviceResponse {
  Util.validateModel(tmpReq);
  var request = new BatchUploadMPCoSPhaseDigestInfoByDeviceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.phaseDataList)) {
    request.phaseDataListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.phaseDataList, 'PhaseDataList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.iotAuthType)) {
    query['IotAuthType'] = request.iotAuthType;
  }
  if (!Util.isUnset(request.iotDataDigest)) {
    query['IotDataDigest'] = request.iotDataDigest;
  }
  if (!Util.isUnset(request.iotId)) {
    query['IotId'] = request.iotId;
  }
  if (!Util.isUnset(request.iotIdServiceProvider)) {
    query['IotIdServiceProvider'] = request.iotIdServiceProvider;
  }
  if (!Util.isUnset(request.iotIdSource)) {
    query['IotIdSource'] = request.iotIdSource;
  }
  if (!Util.isUnset(request.iotSignature)) {
    query['IotSignature'] = request.iotSignature;
  }
  if (!Util.isUnset(request.phaseDataListShrink)) {
    query['PhaseDataList'] = request.phaseDataListShrink;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  if (!Util.isUnset(request.phaseId)) {
    query['PhaseId'] = request.phaseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BatchUploadMPCoSPhaseDigestInfoByDevice',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function batchUploadMPCoSPhaseDigestInfoByDevice(request: BatchUploadMPCoSPhaseDigestInfoByDeviceRequest): BatchUploadMPCoSPhaseDigestInfoByDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchUploadMPCoSPhaseDigestInfoByDeviceWithOptions(request, runtime);
}

model BatchUploadMPCoSPhaseTextInfoRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  phaseDataList?: map[string]any(name='PhaseDataList'),
  phaseGroupId?: string(name='PhaseGroupId', example='987823074334****'),
  phaseId?: string(name='PhaseId', example='196487512811****'),
}

model BatchUploadMPCoSPhaseTextInfoShrinkRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  phaseDataListShrink?: string(name='PhaseDataList'),
  phaseGroupId?: string(name='PhaseGroupId', example='987823074334****'),
  phaseId?: string(name='PhaseId', example='196487512811****'),
}

model BatchUploadMPCoSPhaseTextInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model BatchUploadMPCoSPhaseTextInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BatchUploadMPCoSPhaseTextInfoResponseBody(name='body'),
}

async function batchUploadMPCoSPhaseTextInfoWithOptions(tmpReq: BatchUploadMPCoSPhaseTextInfoRequest, runtime: Util.RuntimeOptions): BatchUploadMPCoSPhaseTextInfoResponse {
  Util.validateModel(tmpReq);
  var request = new BatchUploadMPCoSPhaseTextInfoShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.phaseDataList)) {
    request.phaseDataListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.phaseDataList, 'PhaseDataList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.phaseDataListShrink)) {
    query['PhaseDataList'] = request.phaseDataListShrink;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  if (!Util.isUnset(request.phaseId)) {
    query['PhaseId'] = request.phaseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BatchUploadMPCoSPhaseTextInfo',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function batchUploadMPCoSPhaseTextInfo(request: BatchUploadMPCoSPhaseTextInfoRequest): BatchUploadMPCoSPhaseTextInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchUploadMPCoSPhaseTextInfoWithOptions(request, runtime);
}

model BatchUploadMPCoSPhaseTextInfoByDeviceRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  iotAuthType?: string(name='IotAuthType', example='ID2'),
  iotDataDigest?: string(name='IotDataDigest', example='94894989498FDDABD51698BD1A49BF1AFB0AA94FAA8DB65A689164BEED******'),
  iotId?: string(name='IotId', example='183329761572****'),
  iotIdServiceProvider?: string(name='IotIdServiceProvider', example='g9R4ghe****'),
  iotIdSource?: string(name='IotIdSource', example='2'),
  iotSignature?: string(name='IotSignature', example='2~2~192ADFB498AA****~1579198300000~J8E891NAgAhwHBHm8******/hnswr698HSb09ahS8709bn9s03jg98u4jg******'),
  phaseDataList?: map[string]any(name='PhaseDataList'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
  phaseId?: string(name='PhaseId', example='644208887511****'),
}

model BatchUploadMPCoSPhaseTextInfoByDeviceShrinkRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  iotAuthType?: string(name='IotAuthType', example='ID2'),
  iotDataDigest?: string(name='IotDataDigest', example='94894989498FDDABD51698BD1A49BF1AFB0AA94FAA8DB65A689164BEED******'),
  iotId?: string(name='IotId', example='183329761572****'),
  iotIdServiceProvider?: string(name='IotIdServiceProvider', example='g9R4ghe****'),
  iotIdSource?: string(name='IotIdSource', example='2'),
  iotSignature?: string(name='IotSignature', example='2~2~192ADFB498AA****~1579198300000~J8E891NAgAhwHBHm8******/hnswr698HSb09ahS8709bn9s03jg98u4jg******'),
  phaseDataListShrink?: string(name='PhaseDataList'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
  phaseId?: string(name='PhaseId', example='644208887511****'),
}

model BatchUploadMPCoSPhaseTextInfoByDeviceResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data', example='The system is busy. Please try again later.'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model BatchUploadMPCoSPhaseTextInfoByDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BatchUploadMPCoSPhaseTextInfoByDeviceResponseBody(name='body'),
}

async function batchUploadMPCoSPhaseTextInfoByDeviceWithOptions(tmpReq: BatchUploadMPCoSPhaseTextInfoByDeviceRequest, runtime: Util.RuntimeOptions): BatchUploadMPCoSPhaseTextInfoByDeviceResponse {
  Util.validateModel(tmpReq);
  var request = new BatchUploadMPCoSPhaseTextInfoByDeviceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.phaseDataList)) {
    request.phaseDataListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.phaseDataList, 'PhaseDataList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.iotAuthType)) {
    query['IotAuthType'] = request.iotAuthType;
  }
  if (!Util.isUnset(request.iotDataDigest)) {
    query['IotDataDigest'] = request.iotDataDigest;
  }
  if (!Util.isUnset(request.iotId)) {
    query['IotId'] = request.iotId;
  }
  if (!Util.isUnset(request.iotIdServiceProvider)) {
    query['IotIdServiceProvider'] = request.iotIdServiceProvider;
  }
  if (!Util.isUnset(request.iotIdSource)) {
    query['IotIdSource'] = request.iotIdSource;
  }
  if (!Util.isUnset(request.iotSignature)) {
    query['IotSignature'] = request.iotSignature;
  }
  if (!Util.isUnset(request.phaseDataListShrink)) {
    query['PhaseDataList'] = request.phaseDataListShrink;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  if (!Util.isUnset(request.phaseId)) {
    query['PhaseId'] = request.phaseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BatchUploadMPCoSPhaseTextInfoByDevice',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function batchUploadMPCoSPhaseTextInfoByDevice(request: BatchUploadMPCoSPhaseTextInfoByDeviceRequest): BatchUploadMPCoSPhaseTextInfoByDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchUploadMPCoSPhaseTextInfoByDeviceWithOptions(request, runtime);
}

model CreateMPCoSPhaseRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  name?: string(name='Name'),
  phaseGroupId?: string(name='PhaseGroupId', example='987823074334****'),
  remark?: string(name='Remark'),
}

model CreateMPCoSPhaseResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data', example='196487512811****'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model CreateMPCoSPhaseResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateMPCoSPhaseResponseBody(name='body'),
}

async function createMPCoSPhaseWithOptions(request: CreateMPCoSPhaseRequest, runtime: Util.RuntimeOptions): CreateMPCoSPhaseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  if (!Util.isUnset(request.remark)) {
    query['Remark'] = request.remark;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateMPCoSPhase',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createMPCoSPhase(request: CreateMPCoSPhaseRequest): CreateMPCoSPhaseResponse {
  var runtime = new Util.RuntimeOptions{};
  return createMPCoSPhaseWithOptions(request, runtime);
}

model CreateMPCoSPhaseGroupRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  name?: string(name='Name'),
  remark?: string(name='Remark'),
}

model CreateMPCoSPhaseGroupResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data', example='987823074334****'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model CreateMPCoSPhaseGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateMPCoSPhaseGroupResponseBody(name='body'),
}

async function createMPCoSPhaseGroupWithOptions(request: CreateMPCoSPhaseGroupRequest, runtime: Util.RuntimeOptions): CreateMPCoSPhaseGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.remark)) {
    query['Remark'] = request.remark;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateMPCoSPhaseGroup',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createMPCoSPhaseGroup(request: CreateMPCoSPhaseGroupRequest): CreateMPCoSPhaseGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createMPCoSPhaseGroupWithOptions(request, runtime);
}

model CreateMemberRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  memberContact?: string(name='MemberContact'),
  memberName?: string(name='MemberName'),
  memberPhone?: string(name='MemberPhone', example='1381111****'),
  memberUid?: string(name='MemberUid', example='19720316234381****'),
  remark?: string(name='Remark'),
}

model CreateMemberResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data', example='717534457003****'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model CreateMemberResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateMemberResponseBody(name='body'),
}

async function createMemberWithOptions(request: CreateMemberRequest, runtime: Util.RuntimeOptions): CreateMemberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.memberContact)) {
    query['MemberContact'] = request.memberContact;
  }
  if (!Util.isUnset(request.memberName)) {
    query['MemberName'] = request.memberName;
  }
  if (!Util.isUnset(request.memberPhone)) {
    query['MemberPhone'] = request.memberPhone;
  }
  if (!Util.isUnset(request.memberUid)) {
    query['MemberUid'] = request.memberUid;
  }
  if (!Util.isUnset(request.remark)) {
    query['Remark'] = request.remark;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateMember',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createMember(request: CreateMemberRequest): CreateMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return createMemberWithOptions(request, runtime);
}

model DescribeCapacityInfoRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
}

model DescribeCapacityInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    capacityQuota?: long(name='CapacityQuota', example='800000000000'),
    countQuota?: long(name='CountQuota', example='10000000'),
    memberUsedCapacity?: long(name='MemberUsedCapacity', example='70000000'),
    memberUsedCount?: long(name='MemberUsedCount', example='26666'),
    usedCapacity?: long(name='UsedCapacity', example='870000000'),
    usedCount?: long(name='UsedCount', example='30000'),
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeCapacityInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeCapacityInfoResponseBody(name='body'),
}

async function describeCapacityInfoWithOptions(request: DescribeCapacityInfoRequest, runtime: Util.RuntimeOptions): DescribeCapacityInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCapacityInfo',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCapacityInfo(request: DescribeCapacityInfoRequest): DescribeCapacityInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCapacityInfoWithOptions(request, runtime);
}

model DescribeMPCoSAuthorizedInfoRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  memberId?: string(name='MemberId', example='717534457003****'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
}

model DescribeMPCoSAuthorizedInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    authorizedPhaseList?: [ 
      {
        phaseId?: string(name='PhaseId', example='987823074334****'),
        phaseName?: string(name='PhaseName'),
      }
    ](name='AuthorizedPhaseList'),
    unAuthorizedPhaseList?: [ 
      {
        phaseId?: string(name='PhaseId', example='987823074334****'),
        phaseName?: string(name='PhaseName'),
      }
    ](name='UnAuthorizedPhaseList'),
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeMPCoSAuthorizedInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeMPCoSAuthorizedInfoResponseBody(name='body'),
}

async function describeMPCoSAuthorizedInfoWithOptions(request: DescribeMPCoSAuthorizedInfoRequest, runtime: Util.RuntimeOptions): DescribeMPCoSAuthorizedInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.memberId)) {
    query['MemberId'] = request.memberId;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMPCoSAuthorizedInfo',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMPCoSAuthorizedInfo(request: DescribeMPCoSAuthorizedInfoRequest): DescribeMPCoSAuthorizedInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMPCoSAuthorizedInfoWithOptions(request, runtime);
}

model DescribeMPCoSPhaseInfoRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  dataKey?: string(name='DataKey', example='32bfce96b4e2f9bec0f2ea5cc2f14ace1486cc146d5832d3a84e5332fe89****'),
  dataSeq?: string(name='DataSeq', example='be350cd52b0f47846f93df7d0d4febd86025ee6c028a6b22a6ff1ac6d3a2****'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
  phaseId?: string(name='PhaseId', example='644208887511****'),
}

model DescribeMPCoSPhaseInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    blockHash?: string(name='BlockHash', example='5a5c07672a4efaf609e62d921a60bf7cc0e9722a8b9608520d694520c0c4****'),
    blockNumber?: long(name='BlockNumber', example='1942'),
    dataHash?: string(name='DataHash', example='9608520d694520c0c414075a5c07672a4efaf609e62d921a60bf7cc0e972****'),
    dataValue?: string(name='DataValue'),
    iotId?: string(name='IotId', example='DFA7B98AD494FB98A491****'),
    previousHash?: string(name='PreviousHash', example='bf2cf40e5c21dc14d03eb824f99791c4d07bdaf2736e5faae508d7fb276d****'),
    productKey?: string(name='ProductKey', example='hfoi7GQ****'),
    relatedDataList?: [ 
      {
        relatedDataKey?: string(name='RelatedDataKey', example='256399502929****'),
        relatedDataSeq?: string(name='RelatedDataSeq', example='be350cd52b0f47846f93df7d0d4febd86025ee6c028a6b22a6ff1ac6d3a2****'),
        relatedPhaseDataHash?: string(name='RelatedPhaseDataHash', example='73b5c3dbc828fdf79749ff332af402036f7d591959fda00a2854a160fe66****'),
        relatedPhaseId?: string(name='RelatedPhaseId', example='987823074334****'),
        relatedPhaseName?: string(name='RelatedPhaseName'),
      }
    ](name='RelatedDataList'),
    timestamp?: long(name='Timestamp', example='1605885676000'),
    transactionHash?: string(name='TransactionHash', example='c4d07bdaf2736cc0ec0e909e60e5c21dc14d0eb823eb82f4f99791c4d07b****'),
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeMPCoSPhaseInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeMPCoSPhaseInfoResponseBody(name='body'),
}

async function describeMPCoSPhaseInfoWithOptions(request: DescribeMPCoSPhaseInfoRequest, runtime: Util.RuntimeOptions): DescribeMPCoSPhaseInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.dataKey)) {
    query['DataKey'] = request.dataKey;
  }
  if (!Util.isUnset(request.dataSeq)) {
    query['DataSeq'] = request.dataSeq;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  if (!Util.isUnset(request.phaseId)) {
    query['PhaseId'] = request.phaseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMPCoSPhaseInfo',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMPCoSPhaseInfo(request: DescribeMPCoSPhaseInfoRequest): DescribeMPCoSPhaseInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMPCoSPhaseInfoWithOptions(request, runtime);
}

model DescribeMPCoSResourceInfoRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
}

model DescribeMPCoSResourceInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    memberQuota?: long(name='MemberQuota', example='100'),
    phaseGroupQuota?: long(name='PhaseGroupQuota', example='200'),
    phaseQuotaInfoList?: [ 
      {
        phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
        phaseGroupName?: string(name='PhaseGroupName'),
        phaseQuota?: long(name='PhaseQuota', example='5'),
        usedPhase?: long(name='UsedPhase', example='3'),
      }
    ](name='PhaseQuotaInfoList'),
    usedMember?: long(name='UsedMember', example='5'),
    usedPhaseGroup?: long(name='UsedPhaseGroup', example='10'),
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeMPCoSResourceInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeMPCoSResourceInfoResponseBody(name='body'),
}

async function describeMPCoSResourceInfoWithOptions(request: DescribeMPCoSResourceInfoRequest, runtime: Util.RuntimeOptions): DescribeMPCoSResourceInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMPCoSResourceInfo',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMPCoSResourceInfo(request: DescribeMPCoSResourceInfoRequest): DescribeMPCoSResourceInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMPCoSResourceInfoWithOptions(request, runtime);
}

model DescribeMemberCapacityInfoRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
}

model DescribeMemberCapacityInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: [ 
    {
      memberId?: string(name='MemberId', example='717534457003****'),
      memberName?: string(name='MemberName'),
      memberUid?: string(name='MemberUid', example='19720316234381****'),
      usedCapacity?: string(name='UsedCapacity', example='70000000'),
      usedCount?: string(name='UsedCount', example='26666'),
    }
  ](name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeMemberCapacityInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeMemberCapacityInfoResponseBody(name='body'),
}

async function describeMemberCapacityInfoWithOptions(request: DescribeMemberCapacityInfoRequest, runtime: Util.RuntimeOptions): DescribeMemberCapacityInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMemberCapacityInfo',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMemberCapacityInfo(request: DescribeMemberCapacityInfoRequest): DescribeMemberCapacityInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMemberCapacityInfoWithOptions(request, runtime);
}

model DescribeResourceInfoRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
}

model DescribeResourceInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    authorizeType?: string(name='AuthorizeType'),
    effectiveTime?: long(name='EffectiveTime', example='1586125838680'),
    expiredTime?: long(name='ExpiredTime', example='1666125838680'),
    region?: string(name='Region', example='cn-shanghai'),
    status?: string(name='Status', example='NORMAL'),
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model DescribeResourceInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeResourceInfoResponseBody(name='body'),
}

async function describeResourceInfoWithOptions(request: DescribeResourceInfoRequest, runtime: Util.RuntimeOptions): DescribeResourceInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeResourceInfo',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeResourceInfo(request: DescribeResourceInfoRequest): DescribeResourceInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeResourceInfoWithOptions(request, runtime);
}

model GetBlockChainInfoRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  businessId?: string(name='BusinessId', example='000000000000000000000000000000000000000000000000000000000001****'),
  key?: string(name='Key', example='0001_HB5jyvZWzwcM****_0X**_80aa976ac4d64a97bd45c71a509d****'),
  productKey?: string(name='ProductKey', example='HB5jyvZWzwcM****'),
}

model GetBlockChainInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model GetBlockChainInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetBlockChainInfoResponseBody(name='body'),
}

async function getBlockChainInfoWithOptions(request: GetBlockChainInfoRequest, runtime: Util.RuntimeOptions): GetBlockChainInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.businessId)) {
    query['BusinessId'] = request.businessId;
  }
  if (!Util.isUnset(request.key)) {
    query['Key'] = request.key;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetBlockChainInfo',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getBlockChainInfo(request: GetBlockChainInfoRequest): GetBlockChainInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getBlockChainInfoWithOptions(request, runtime);
}

model GetDataRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  businessId?: string(name='BusinessId', example='000000000000000000000000000000000000000000000000000000000001****'),
  key?: string(name='Key', example='HB5jyvZWzw******'),
  productKey?: string(name='ProductKey', example='0001_HB5jyvZWzwcMFSFg_0X58_80aa976ac4d64a97b******a509d4c0b'),
}

model GetDataResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model GetDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDataResponseBody(name='body'),
}

async function getDataWithOptions(request: GetDataRequest, runtime: Util.RuntimeOptions): GetDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.businessId)) {
    query['BusinessId'] = request.businessId;
  }
  if (!Util.isUnset(request.key)) {
    query['Key'] = request.key;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetData',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getData(request: GetDataRequest): GetDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDataWithOptions(request, runtime);
}

model GetDataModelConfigInfoRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  dataModelCode?: string(name='DataModelCode', example='DF3K'),
  productKey?: string(name='ProductKey', example='HB5jyvZWzwcM****'),
}

model GetDataModelConfigInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data', example='{}'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='RequestID-1638240165139'),
  success?: boolean(name='Success', example='true'),
}

model GetDataModelConfigInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDataModelConfigInfoResponseBody(name='body'),
}

async function getDataModelConfigInfoWithOptions(request: GetDataModelConfigInfoRequest, runtime: Util.RuntimeOptions): GetDataModelConfigInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.dataModelCode)) {
    query['DataModelCode'] = request.dataModelCode;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDataModelConfigInfo',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDataModelConfigInfo(request: GetDataModelConfigInfoRequest): GetDataModelConfigInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDataModelConfigInfoWithOptions(request, runtime);
}

model GetHistoryDataCountRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  endTime?: long(name='EndTime', example='1608019800000'),
  key?: string(name='Key', example='0001_HB5jyvZWzwcM****_0X**_80aa976ac4d64a97bd45c71a509d****'),
  productKey?: string(name='ProductKey', example='HB5jyvZWzwcM****'),
  startTime?: long(name='StartTime', example='1608010000000'),
}

model GetHistoryDataCountResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data', example='10'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model GetHistoryDataCountResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetHistoryDataCountResponseBody(name='body'),
}

async function getHistoryDataCountWithOptions(request: GetHistoryDataCountRequest, runtime: Util.RuntimeOptions): GetHistoryDataCountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.key)) {
    query['Key'] = request.key;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetHistoryDataCount',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getHistoryDataCount(request: GetHistoryDataCountRequest): GetHistoryDataCountResponse {
  var runtime = new Util.RuntimeOptions{};
  return getHistoryDataCountWithOptions(request, runtime);
}

model GetHistoryDataListRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  currentPage?: int32(name='CurrentPage', example='1'),
  endTime?: long(name='EndTime', example='1608019800000'),
  key?: string(name='Key', example='0001_HB5jyvZWzwcM****_0X**_80aa976ac4d64a97bd45c71a509d****'),
  pageSize?: int32(name='PageSize', example='2'),
  productKey?: string(name='ProductKey', example='HB5jyvZWzwcM****'),
  startTime?: long(name='StartTime', example='1608010000000'),
}

model GetHistoryDataListResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    data?: [  map[string]any ](name='Data')
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model GetHistoryDataListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetHistoryDataListResponseBody(name='body'),
}

async function getHistoryDataListWithOptions(request: GetHistoryDataListRequest, runtime: Util.RuntimeOptions): GetHistoryDataListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.key)) {
    query['Key'] = request.key;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetHistoryDataList',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getHistoryDataList(request: GetHistoryDataListRequest): GetHistoryDataListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getHistoryDataListWithOptions(request, runtime);
}

model ListDependentDataModelsRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  productKey?: string(name='ProductKey', example='HB5jyvZWzwcM****'),
}

model ListDependentDataModelsResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    dataModelInfo?: [ 
    {
      dataModelCode?: string(name='DataModelCode', example='KI8D'),
      dataModelName?: string(name='DataModelName'),
    }
  ](name='DataModelInfo')
  }(name='Data', example='{}'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='RequestID-1638239980855'),
  success?: boolean(name='Success', example='true'),
}

model ListDependentDataModelsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDependentDataModelsResponseBody(name='body'),
}

async function listDependentDataModelsWithOptions(request: ListDependentDataModelsRequest, runtime: Util.RuntimeOptions): ListDependentDataModelsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDependentDataModels',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDependentDataModels(request: ListDependentDataModelsRequest): ListDependentDataModelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDependentDataModelsWithOptions(request, runtime);
}

model ListDeviceRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  deviceGroupId?: string(name='DeviceGroupId', example='475020454741****'),
  iotId?: string(name='IotId', example='183329761572****'),
  num?: int32(name='Num', example='1'),
  size?: int32(name='Size', example='2'),
}

model ListDeviceResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    num?: int32(name='Num', example='1'),
    pageData?: [ 
      {
        deviceId?: string(name='DeviceId', example='876055554040****'),
        iotId?: string(name='IotId', example='183329761572****'),
        lastSaveTime?: long(name='LastSaveTime', example='1606379090866'),
        status?: string(name='Status', example='AUTHORIZED'),
      }
    ](name='PageData'),
    size?: int32(name='Size', example='2'),
    total?: int32(name='Total', example='30'),
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model ListDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDeviceResponseBody(name='body'),
}

async function listDeviceWithOptions(request: ListDeviceRequest, runtime: Util.RuntimeOptions): ListDeviceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.deviceGroupId)) {
    query['DeviceGroupId'] = request.deviceGroupId;
  }
  if (!Util.isUnset(request.iotId)) {
    query['IotId'] = request.iotId;
  }
  if (!Util.isUnset(request.num)) {
    query['Num'] = request.num;
  }
  if (!Util.isUnset(request.size)) {
    query['Size'] = request.size;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDevice',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDevice(request: ListDeviceRequest): ListDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDeviceWithOptions(request, runtime);
}

model ListDeviceGroupRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  num?: int32(name='Num', example='1'),
  productKey?: string(name='ProductKey', example='hKpHMh2****'),
  size?: int32(name='Size', example='2'),
}

model ListDeviceGroupResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    num?: int32(name='Num', example='1'),
    pageData?: [ 
      {
        authorizeType?: string(name='AuthorizeType', example='ID2'),
        deviceGroupId?: string(name='DeviceGroupId', example='577187700697****'),
        ownerName?: string(name='OwnerName'),
        ownerUid?: string(name='OwnerUid', example='19720316234381****'),
        productKey?: string(name='ProductKey', example='hKpHMh2****'),
        remark?: string(name='Remark'),
        status?: string(name='Status', example='AUTHORIZED'),
      }
    ](name='PageData'),
    size?: int32(name='Size', example='2'),
    total?: int32(name='Total', example='30'),
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model ListDeviceGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDeviceGroupResponseBody(name='body'),
}

async function listDeviceGroupWithOptions(request: ListDeviceGroupRequest, runtime: Util.RuntimeOptions): ListDeviceGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.num)) {
    query['Num'] = request.num;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }
  if (!Util.isUnset(request.size)) {
    query['Size'] = request.size;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDeviceGroup',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDeviceGroup(request: ListDeviceGroupRequest): ListDeviceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDeviceGroupWithOptions(request, runtime);
}

model ListMPCoSPhaseRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  name?: string(name='Name'),
  num?: int32(name='Num', example='1'),
  phaseGroupId?: string(name='PhaseGroupId', example='987823074334****'),
  size?: int32(name='Size', example='1'),
}

model ListMPCoSPhaseResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    num?: int32(name='Num', example='1'),
    pageData?: [ 
      {
        accessPermission?: int32(name='AccessPermission', example='1'),
        name?: string(name='Name'),
        phaseId?: string(name='PhaseId', example='196487512811****'),
        remark?: string(name='Remark'),
      }
    ](name='PageData'),
    size?: int32(name='Size', example='1'),
    total?: int32(name='Total', example='1'),
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model ListMPCoSPhaseResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListMPCoSPhaseResponseBody(name='body'),
}

async function listMPCoSPhaseWithOptions(request: ListMPCoSPhaseRequest, runtime: Util.RuntimeOptions): ListMPCoSPhaseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.num)) {
    query['Num'] = request.num;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  if (!Util.isUnset(request.size)) {
    query['Size'] = request.size;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListMPCoSPhase',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listMPCoSPhase(request: ListMPCoSPhaseRequest): ListMPCoSPhaseResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMPCoSPhaseWithOptions(request, runtime);
}

model ListMPCoSPhaseGroupRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  name?: string(name='Name'),
  num?: int32(name='Num', example='1'),
  size?: int32(name='Size', example='2'),
}

model ListMPCoSPhaseGroupResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    num?: int32(name='Num', example='1'),
    pageData?: [ 
      {
        name?: string(name='Name'),
        phaseGroupId?: string(name='PhaseGroupId', example='987823074334****'),
        remark?: string(name='Remark'),
      }
    ](name='PageData'),
    size?: int32(name='Size', example='1'),
    total?: int32(name='Total', example='1'),
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model ListMPCoSPhaseGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListMPCoSPhaseGroupResponseBody(name='body'),
}

async function listMPCoSPhaseGroupWithOptions(request: ListMPCoSPhaseGroupRequest, runtime: Util.RuntimeOptions): ListMPCoSPhaseGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.num)) {
    query['Num'] = request.num;
  }
  if (!Util.isUnset(request.size)) {
    query['Size'] = request.size;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListMPCoSPhaseGroup',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listMPCoSPhaseGroup(request: ListMPCoSPhaseGroupRequest): ListMPCoSPhaseGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMPCoSPhaseGroupWithOptions(request, runtime);
}

model ListMPCoSPhaseHistoryRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  dataKey?: string(name='DataKey', example='32bfce96b4e2f9bec0f2ea5cc2f14ace1486cc146d5832d3a84e5332fe89****'),
  endTime?: long(name='EndTime', example='1606389090866'),
  num?: int32(name='Num', example='1'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
  phaseId?: string(name='PhaseId', example='644208887511****'),
  size?: int32(name='Size', example='2'),
  startTime?: long(name='StartTime', example='1606379090866'),
}

model ListMPCoSPhaseHistoryResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    num?: int32(name='Num', example='1'),
    pageData?: [ 
      {
        blockHash?: string(name='BlockHash', example='5a5c07672a4efaf609e62d921a60bf7cc0e9722a8b9608520d694520c0c4****'),
        blockNumber?: long(name='BlockNumber', example='9852'),
        dataHash?: string(name='DataHash', example='9608520d694520c0c414075a5c07672a4efaf609e62d921a60bf7cc0e972****'),
        dataSeq?: string(name='DataSeq', example='be350cd52b0f47846f93df7d0d4febd86025ee6c028a6b22a6ff1ac6d3a2****'),
        dataValue?: string(name='DataValue'),
        iotId?: string(name='IotId', example='DFA7B98AD494FB98A491****'),
        previousHash?: string(name='PreviousHash', example='2d921a60bf7cc0e9722a8bcc0e909e62d92120c0c749ff332af402036f7d****'),
        productKey?: string(name='ProductKey', example='hfoi7GQ****'),
        timestamp?: long(name='Timestamp', example='1606389620000'),
        transactionHash?: string(name='TransactionHash', example='bf2cf40e5c21dc14d03eb824f99791c4d07bdaf2736e5faae508d7fb276d****'),
      }
    ](name='PageData'),
    size?: int32(name='Size', example='2'),
    total?: int32(name='Total', example='10'),
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model ListMPCoSPhaseHistoryResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListMPCoSPhaseHistoryResponseBody(name='body'),
}

async function listMPCoSPhaseHistoryWithOptions(request: ListMPCoSPhaseHistoryRequest, runtime: Util.RuntimeOptions): ListMPCoSPhaseHistoryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.dataKey)) {
    query['DataKey'] = request.dataKey;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.num)) {
    query['Num'] = request.num;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  if (!Util.isUnset(request.phaseId)) {
    query['PhaseId'] = request.phaseId;
  }
  if (!Util.isUnset(request.size)) {
    query['Size'] = request.size;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListMPCoSPhaseHistory',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listMPCoSPhaseHistory(request: ListMPCoSPhaseHistoryRequest): ListMPCoSPhaseHistoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMPCoSPhaseHistoryWithOptions(request, runtime);
}

model ListMemberRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  memberUid?: string(name='MemberUid', example='19720316234381****'),
  num?: int32(name='Num', example='1'),
  size?: int32(name='Size', example='2'),
}

model ListMemberResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    num?: int32(name='Num', example='1'),
    pageData?: [ 
      {
        memberContact?: string(name='MemberContact'),
        memberId?: string(name='MemberId', example='717534457003****'),
        memberName?: string(name='MemberName'),
        memberPhone?: string(name='MemberPhone', example='1381111****'),
        memberUid?: string(name='MemberUid', example='19720316234381****'),
        remark?: string(name='Remark'),
        status?: string(name='Status', example='UNLOCK'),
      }
    ](name='PageData'),
    size?: int32(name='Size', example='2'),
    total?: int32(name='Total', example='30'),
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model ListMemberResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListMemberResponseBody(name='body'),
}

async function listMemberWithOptions(request: ListMemberRequest, runtime: Util.RuntimeOptions): ListMemberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.memberUid)) {
    query['MemberUid'] = request.memberUid;
  }
  if (!Util.isUnset(request.num)) {
    query['Num'] = request.num;
  }
  if (!Util.isUnset(request.size)) {
    query['Size'] = request.size;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListMember',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listMember(request: ListMemberRequest): ListMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMemberWithOptions(request, runtime);
}

model ListMultiPartyCollaborationChainRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  name?: string(name='Name'),
  num?: int32(name='Num', example='1'),
  size?: int32(name='Size', example='1'),
}

model ListMultiPartyCollaborationChainResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    num?: int32(name='Num', example='1'),
    pageData?: [ 
      {
        bizChainId?: string(name='BizChainId', example='489973087549****'),
        name?: string(name='Name'),
        remark?: string(name='Remark'),
        roleType?: string(name='RoleType', example='ADMIN'),
      }
    ](name='PageData'),
    size?: int32(name='Size', example='1'),
    total?: int32(name='Total', example='1'),
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model ListMultiPartyCollaborationChainResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListMultiPartyCollaborationChainResponseBody(name='body'),
}

async function listMultiPartyCollaborationChainWithOptions(request: ListMultiPartyCollaborationChainRequest, runtime: Util.RuntimeOptions): ListMultiPartyCollaborationChainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.num)) {
    query['Num'] = request.num;
  }
  if (!Util.isUnset(request.size)) {
    query['Size'] = request.size;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListMultiPartyCollaborationChain',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listMultiPartyCollaborationChain(request: ListMultiPartyCollaborationChainRequest): ListMultiPartyCollaborationChainResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMultiPartyCollaborationChainWithOptions(request, runtime);
}

model ListPSMemberDataTypeCodeRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  memberUid?: string(name='MemberUid', example='19720316234381****'),
  num?: int32(name='Num', example='1'),
  size?: int32(name='Size', example='2'),
}

model ListPSMemberDataTypeCodeResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    num?: int32(name='Num', example='1'),
    pageData?: [ 
      {
        dataTypeCode?: string(name='DataTypeCode', example='E***'),
        memberId?: string(name='MemberId', example='717534457003****'),
        memberName?: string(name='MemberName'),
        memberUid?: string(name='MemberUid', example='19720316234381****'),
      }
    ](name='PageData'),
    size?: int32(name='Size', example='2'),
    total?: int32(name='Total', example='10'),
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model ListPSMemberDataTypeCodeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListPSMemberDataTypeCodeResponseBody(name='body'),
}

async function listPSMemberDataTypeCodeWithOptions(request: ListPSMemberDataTypeCodeRequest, runtime: Util.RuntimeOptions): ListPSMemberDataTypeCodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.memberUid)) {
    query['MemberUid'] = request.memberUid;
  }
  if (!Util.isUnset(request.num)) {
    query['Num'] = request.num;
  }
  if (!Util.isUnset(request.size)) {
    query['Size'] = request.size;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPSMemberDataTypeCode',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listPSMemberDataTypeCode(request: ListPSMemberDataTypeCodeRequest): ListPSMemberDataTypeCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPSMemberDataTypeCodeWithOptions(request, runtime);
}

model ListProofChainRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  name?: string(name='Name'),
  num?: int32(name='Num', example='1'),
  size?: int32(name='Size', example='2'),
}

model ListProofChainResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    num?: int32(name='Num', example='1'),
    pageData?: [ 
      {
        bizChainCode?: string(name='BizChainCode', example='SA7z9XkBMVPg****'),
        bizChainId?: string(name='BizChainId', example='489973087549****'),
        dataTypeCode?: string(name='DataTypeCode', example='B***'),
        name?: string(name='Name'),
        remark?: string(name='Remark'),
        roleType?: string(name='RoleType', example='ADMIN'),
      }
    ](name='PageData'),
    size?: int32(name='Size', example='2'),
    total?: int32(name='Total', example='10'),
  }(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model ListProofChainResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListProofChainResponseBody(name='body'),
}

async function listProofChainWithOptions(request: ListProofChainRequest, runtime: Util.RuntimeOptions): ListProofChainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.num)) {
    query['Num'] = request.num;
  }
  if (!Util.isUnset(request.size)) {
    query['Size'] = request.size;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListProofChain',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listProofChain(request: ListProofChainRequest): ListProofChainResponse {
  var runtime = new Util.RuntimeOptions{};
  return listProofChainWithOptions(request, runtime);
}

model LockMemberRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  memberId?: string(name='MemberId', example='717534457003****'),
}

model LockMemberResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model LockMemberResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: LockMemberResponseBody(name='body'),
}

async function lockMemberWithOptions(request: LockMemberRequest, runtime: Util.RuntimeOptions): LockMemberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.memberId)) {
    query['MemberId'] = request.memberId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'LockMember',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function lockMember(request: LockMemberRequest): LockMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return lockMemberWithOptions(request, runtime);
}

model ModifyMPCoSPhaseRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  name?: string(name='Name'),
  phaseId?: string(name='PhaseId', example='196487512811****'),
  remark?: string(name='Remark'),
}

model ModifyMPCoSPhaseResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model ModifyMPCoSPhaseResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyMPCoSPhaseResponseBody(name='body'),
}

async function modifyMPCoSPhaseWithOptions(request: ModifyMPCoSPhaseRequest, runtime: Util.RuntimeOptions): ModifyMPCoSPhaseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.phaseId)) {
    query['PhaseId'] = request.phaseId;
  }
  if (!Util.isUnset(request.remark)) {
    query['Remark'] = request.remark;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyMPCoSPhase',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyMPCoSPhase(request: ModifyMPCoSPhaseRequest): ModifyMPCoSPhaseResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyMPCoSPhaseWithOptions(request, runtime);
}

model ModifyMPCoSPhaseGroupRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  name?: string(name='Name'),
  phaseGroupId?: string(name='PhaseGroupId', example='987823074334****'),
  remark?: string(name='Remark'),
}

model ModifyMPCoSPhaseGroupResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model ModifyMPCoSPhaseGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyMPCoSPhaseGroupResponseBody(name='body'),
}

async function modifyMPCoSPhaseGroupWithOptions(request: ModifyMPCoSPhaseGroupRequest, runtime: Util.RuntimeOptions): ModifyMPCoSPhaseGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  if (!Util.isUnset(request.remark)) {
    query['Remark'] = request.remark;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyMPCoSPhaseGroup',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyMPCoSPhaseGroup(request: ModifyMPCoSPhaseGroupRequest): ModifyMPCoSPhaseGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyMPCoSPhaseGroupWithOptions(request, runtime);
}

model ModifyMemberRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  memberContact?: string(name='MemberContact'),
  memberId?: string(name='MemberId', example='717534457003****'),
  memberName?: string(name='MemberName'),
  memberPhone?: string(name='MemberPhone', example='1381111****'),
  memberUid?: string(name='MemberUid', example='19720316234381****'),
  remark?: string(name='Remark'),
}

model ModifyMemberResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model ModifyMemberResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyMemberResponseBody(name='body'),
}

async function modifyMemberWithOptions(request: ModifyMemberRequest, runtime: Util.RuntimeOptions): ModifyMemberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.memberContact)) {
    query['MemberContact'] = request.memberContact;
  }
  if (!Util.isUnset(request.memberId)) {
    query['MemberId'] = request.memberId;
  }
  if (!Util.isUnset(request.memberName)) {
    query['MemberName'] = request.memberName;
  }
  if (!Util.isUnset(request.memberPhone)) {
    query['MemberPhone'] = request.memberPhone;
  }
  if (!Util.isUnset(request.memberUid)) {
    query['MemberUid'] = request.memberUid;
  }
  if (!Util.isUnset(request.remark)) {
    query['Remark'] = request.remark;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyMember',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyMember(request: ModifyMemberRequest): ModifyMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyMemberWithOptions(request, runtime);
}

model RegisterDeviceGroupRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  authorizeType?: string(name='AuthorizeType', example='ID2'),
  bizChainId?: string(name='BizChainId', example='981184817831****'),
  deviceGroupName?: string(name='DeviceGroupName'),
  productKey?: string(name='ProductKey', example='hKpHMh2****'),
  remark?: string(name='Remark'),
}

model RegisterDeviceGroupResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data', example='256399502929****'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model RegisterDeviceGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RegisterDeviceGroupResponseBody(name='body'),
}

async function registerDeviceGroupWithOptions(request: RegisterDeviceGroupRequest, runtime: Util.RuntimeOptions): RegisterDeviceGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.authorizeType)) {
    query['AuthorizeType'] = request.authorizeType;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.deviceGroupName)) {
    query['DeviceGroupName'] = request.deviceGroupName;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }
  if (!Util.isUnset(request.remark)) {
    query['Remark'] = request.remark;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RegisterDeviceGroup',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function registerDeviceGroup(request: RegisterDeviceGroupRequest): RegisterDeviceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return registerDeviceGroupWithOptions(request, runtime);
}

model SetDataRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  key?: string(name='Key', example='0001_HB5jyvZWzwcMFSFg_0X58_80aa976ac4d64a97b******a509d4c0b'),
  productKey?: string(name='ProductKey', example='HB5jyvZWz******g'),
  value?: string(name='Value'),
}

model SetDataResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model SetDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetDataResponseBody(name='body'),
}

async function setDataWithOptions(request: SetDataRequest, runtime: Util.RuntimeOptions): SetDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.key)) {
    query['Key'] = request.key;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }
  if (!Util.isUnset(request.value)) {
    query['Value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetData',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setData(request: SetDataRequest): SetDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return setDataWithOptions(request, runtime);
}

model SetDataWithSignatureRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  iotAuthType?: string(name='IotAuthType', example='ID2'),
  iotDataDigest?: string(name='IotDataDigest', example='31A200471049AEA3B8459455B4447D05DD1290A875A17792F71D5550F048****'),
  iotId?: string(name='IotId', example='00CCCC098D98F2BDD8BB****'),
  iotIdServiceProvider?: string(name='IotIdServiceProvider', example='kKpACh5****'),
  iotIdSource?: string(name='IotIdSource', example='2'),
  iotSignature?: string(name='IotSignature', example='3~2~010253040257****~1599722505821~50sZwIXt9jtTTIoGAkEs4THSyCMghVVaYO1w2AcvQf0vm51MQYt0nfHUT7jQ****'),
  key?: string(name='Key', example='0001_HB5jyvZWzwcMFSFg_0X58_80aa976ac4d64a97bd45c71a509d****'),
  productKey?: string(name='ProductKey', example='HB5jyvZWzwcM****'),
  value?: string(name='Value'),
}

model SetDataWithSignatureResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model SetDataWithSignatureResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetDataWithSignatureResponseBody(name='body'),
}

async function setDataWithSignatureWithOptions(request: SetDataWithSignatureRequest, runtime: Util.RuntimeOptions): SetDataWithSignatureResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.iotAuthType)) {
    query['IotAuthType'] = request.iotAuthType;
  }
  if (!Util.isUnset(request.iotDataDigest)) {
    query['IotDataDigest'] = request.iotDataDigest;
  }
  if (!Util.isUnset(request.iotId)) {
    query['IotId'] = request.iotId;
  }
  if (!Util.isUnset(request.iotIdServiceProvider)) {
    query['IotIdServiceProvider'] = request.iotIdServiceProvider;
  }
  if (!Util.isUnset(request.iotIdSource)) {
    query['IotIdSource'] = request.iotIdSource;
  }
  if (!Util.isUnset(request.iotSignature)) {
    query['IotSignature'] = request.iotSignature;
  }
  if (!Util.isUnset(request.key)) {
    query['Key'] = request.key;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }
  if (!Util.isUnset(request.value)) {
    query['Value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetDataWithSignature',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setDataWithSignature(request: SetDataWithSignatureRequest): SetDataWithSignatureResponse {
  var runtime = new Util.RuntimeOptions{};
  return setDataWithSignatureWithOptions(request, runtime);
}

model UnAuthorizeDeviceRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  deviceGroupId?: string(name='DeviceGroupId', example='475020454741****'),
  deviceId?: string(name='DeviceId', example='654887879557****'),
}

model UnAuthorizeDeviceResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model UnAuthorizeDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UnAuthorizeDeviceResponseBody(name='body'),
}

async function unAuthorizeDeviceWithOptions(request: UnAuthorizeDeviceRequest, runtime: Util.RuntimeOptions): UnAuthorizeDeviceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.deviceGroupId)) {
    query['DeviceGroupId'] = request.deviceGroupId;
  }
  if (!Util.isUnset(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UnAuthorizeDevice',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unAuthorizeDevice(request: UnAuthorizeDeviceRequest): UnAuthorizeDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return unAuthorizeDeviceWithOptions(request, runtime);
}

model UnAuthorizeDeviceGroupRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  deviceGroupId?: string(name='DeviceGroupId', example='475020454741****'),
}

model UnAuthorizeDeviceGroupResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model UnAuthorizeDeviceGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UnAuthorizeDeviceGroupResponseBody(name='body'),
}

async function unAuthorizeDeviceGroupWithOptions(request: UnAuthorizeDeviceGroupRequest, runtime: Util.RuntimeOptions): UnAuthorizeDeviceGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.deviceGroupId)) {
    query['DeviceGroupId'] = request.deviceGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UnAuthorizeDeviceGroup',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unAuthorizeDeviceGroup(request: UnAuthorizeDeviceGroupRequest): UnAuthorizeDeviceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return unAuthorizeDeviceGroupWithOptions(request, runtime);
}

model UnLockMemberRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  memberId?: string(name='MemberId', example='717534457003****'),
}

model UnLockMemberResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model UnLockMemberResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UnLockMemberResponseBody(name='body'),
}

async function unLockMemberWithOptions(request: UnLockMemberRequest, runtime: Util.RuntimeOptions): UnLockMemberResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.memberId)) {
    query['MemberId'] = request.memberId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UnLockMember',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unLockMember(request: UnLockMemberRequest): UnLockMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return unLockMemberWithOptions(request, runtime);
}

model UpdateMPCoSAuthorizedInfoRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  authorizedPhaseList?: map[string]any(name='AuthorizedPhaseList', example='["196487512811****","196487512812****"]'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  memberId?: string(name='MemberId', example='717534457003****'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
}

model UpdateMPCoSAuthorizedInfoShrinkRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  authorizedPhaseListShrink?: string(name='AuthorizedPhaseList', example='["196487512811****","196487512812****"]'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  memberId?: string(name='MemberId', example='717534457003****'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
}

model UpdateMPCoSAuthorizedInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model UpdateMPCoSAuthorizedInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateMPCoSAuthorizedInfoResponseBody(name='body'),
}

async function updateMPCoSAuthorizedInfoWithOptions(tmpReq: UpdateMPCoSAuthorizedInfoRequest, runtime: Util.RuntimeOptions): UpdateMPCoSAuthorizedInfoResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateMPCoSAuthorizedInfoShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.authorizedPhaseList)) {
    request.authorizedPhaseListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.authorizedPhaseList, 'AuthorizedPhaseList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.authorizedPhaseListShrink)) {
    query['AuthorizedPhaseList'] = request.authorizedPhaseListShrink;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.memberId)) {
    query['MemberId'] = request.memberId;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateMPCoSAuthorizedInfo',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateMPCoSAuthorizedInfo(request: UpdateMPCoSAuthorizedInfoRequest): UpdateMPCoSAuthorizedInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateMPCoSAuthorizedInfoWithOptions(request, runtime);
}

model UploadMPCoSPhaseDigestInfoRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  dataKey?: string(name='DataKey', example='32bfce96b4e2f9bec0f2ea5cc2f14ace1486cc146d5832d3a84e5332fe89****'),
  dataSeq?: string(name='DataSeq', example='be350cd52b0f47846f93df7d0d4febd86025ee6c028a6b22a6ff1ac6d3a2****'),
  phaseData?: string(name='PhaseData', example='dee68c73bdead5f717fc25803236924c165d0a3c1728aa58cbf05b1473c2****'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
  phaseId?: string(name='PhaseId', example='644208887511***'),
  relatedDataList?: map[string]any(name='RelatedDataList'),
}

model UploadMPCoSPhaseDigestInfoShrinkRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  dataKey?: string(name='DataKey', example='32bfce96b4e2f9bec0f2ea5cc2f14ace1486cc146d5832d3a84e5332fe89****'),
  dataSeq?: string(name='DataSeq', example='be350cd52b0f47846f93df7d0d4febd86025ee6c028a6b22a6ff1ac6d3a2****'),
  phaseData?: string(name='PhaseData', example='dee68c73bdead5f717fc25803236924c165d0a3c1728aa58cbf05b1473c2****'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
  phaseId?: string(name='PhaseId', example='644208887511***'),
  relatedDataListShrink?: string(name='RelatedDataList'),
}

model UploadMPCoSPhaseDigestInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model UploadMPCoSPhaseDigestInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UploadMPCoSPhaseDigestInfoResponseBody(name='body'),
}

async function uploadMPCoSPhaseDigestInfoWithOptions(tmpReq: UploadMPCoSPhaseDigestInfoRequest, runtime: Util.RuntimeOptions): UploadMPCoSPhaseDigestInfoResponse {
  Util.validateModel(tmpReq);
  var request = new UploadMPCoSPhaseDigestInfoShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.relatedDataList)) {
    request.relatedDataListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.relatedDataList, 'RelatedDataList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.dataKey)) {
    query['DataKey'] = request.dataKey;
  }
  if (!Util.isUnset(request.dataSeq)) {
    query['DataSeq'] = request.dataSeq;
  }
  if (!Util.isUnset(request.phaseData)) {
    query['PhaseData'] = request.phaseData;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  if (!Util.isUnset(request.phaseId)) {
    query['PhaseId'] = request.phaseId;
  }
  if (!Util.isUnset(request.relatedDataListShrink)) {
    query['RelatedDataList'] = request.relatedDataListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UploadMPCoSPhaseDigestInfo',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function uploadMPCoSPhaseDigestInfo(request: UploadMPCoSPhaseDigestInfoRequest): UploadMPCoSPhaseDigestInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadMPCoSPhaseDigestInfoWithOptions(request, runtime);
}

model UploadMPCoSPhaseDigestInfoByDeviceRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  dataKey?: string(name='DataKey', example='32bfce96b4e2f9bec0f2ea5cc2f14ace1486cc146d5832d3a84e5332fe89****'),
  dataSeq?: string(name='DataSeq', example='be350cd52b0f47846f93df7d0d4febd86025ee6c028a6b22a6ff1ac6d3a2****'),
  iotAuthType?: string(name='IotAuthType', example='ID2'),
  iotDataDigest?: string(name='IotDataDigest', example='94894989498FDDABD51698BD1A49BF1AFB0AA94FAA8DB65A689164BEED******'),
  iotId?: string(name='IotId', example='183329761572****'),
  iotIdServiceProvider?: string(name='IotIdServiceProvider', example='g9R4ghe****'),
  iotIdSource?: string(name='IotIdSource', example='2'),
  iotSignature?: string(name='IotSignature', example='2~2~192ADFB498AA****~1579198300000~J8E891NAgAhwHBHm8******/hnswr698HSb09ahS8709bn9s03jg98u4jg******'),
  phaseData?: string(name='PhaseData', example='ebf44d78ae75288d7d0057a5ebf44d78a6b86d04502dcbda643c4d24ff2a****'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
  phaseId?: string(name='PhaseId', example='644208887511****'),
  relatedDataList?: map[string]any(name='RelatedDataList'),
}

model UploadMPCoSPhaseDigestInfoByDeviceShrinkRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  dataKey?: string(name='DataKey', example='32bfce96b4e2f9bec0f2ea5cc2f14ace1486cc146d5832d3a84e5332fe89****'),
  dataSeq?: string(name='DataSeq', example='be350cd52b0f47846f93df7d0d4febd86025ee6c028a6b22a6ff1ac6d3a2****'),
  iotAuthType?: string(name='IotAuthType', example='ID2'),
  iotDataDigest?: string(name='IotDataDigest', example='94894989498FDDABD51698BD1A49BF1AFB0AA94FAA8DB65A689164BEED******'),
  iotId?: string(name='IotId', example='183329761572****'),
  iotIdServiceProvider?: string(name='IotIdServiceProvider', example='g9R4ghe****'),
  iotIdSource?: string(name='IotIdSource', example='2'),
  iotSignature?: string(name='IotSignature', example='2~2~192ADFB498AA****~1579198300000~J8E891NAgAhwHBHm8******/hnswr698HSb09ahS8709bn9s03jg98u4jg******'),
  phaseData?: string(name='PhaseData', example='ebf44d78ae75288d7d0057a5ebf44d78a6b86d04502dcbda643c4d24ff2a****'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
  phaseId?: string(name='PhaseId', example='644208887511****'),
  relatedDataListShrink?: string(name='RelatedDataList'),
}

model UploadMPCoSPhaseDigestInfoByDeviceResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model UploadMPCoSPhaseDigestInfoByDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UploadMPCoSPhaseDigestInfoByDeviceResponseBody(name='body'),
}

async function uploadMPCoSPhaseDigestInfoByDeviceWithOptions(tmpReq: UploadMPCoSPhaseDigestInfoByDeviceRequest, runtime: Util.RuntimeOptions): UploadMPCoSPhaseDigestInfoByDeviceResponse {
  Util.validateModel(tmpReq);
  var request = new UploadMPCoSPhaseDigestInfoByDeviceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.relatedDataList)) {
    request.relatedDataListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.relatedDataList, 'RelatedDataList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.dataKey)) {
    query['DataKey'] = request.dataKey;
  }
  if (!Util.isUnset(request.dataSeq)) {
    query['DataSeq'] = request.dataSeq;
  }
  if (!Util.isUnset(request.iotAuthType)) {
    query['IotAuthType'] = request.iotAuthType;
  }
  if (!Util.isUnset(request.iotDataDigest)) {
    query['IotDataDigest'] = request.iotDataDigest;
  }
  if (!Util.isUnset(request.iotId)) {
    query['IotId'] = request.iotId;
  }
  if (!Util.isUnset(request.iotIdServiceProvider)) {
    query['IotIdServiceProvider'] = request.iotIdServiceProvider;
  }
  if (!Util.isUnset(request.iotIdSource)) {
    query['IotIdSource'] = request.iotIdSource;
  }
  if (!Util.isUnset(request.iotSignature)) {
    query['IotSignature'] = request.iotSignature;
  }
  if (!Util.isUnset(request.phaseData)) {
    query['PhaseData'] = request.phaseData;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  if (!Util.isUnset(request.phaseId)) {
    query['PhaseId'] = request.phaseId;
  }
  if (!Util.isUnset(request.relatedDataListShrink)) {
    query['RelatedDataList'] = request.relatedDataListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UploadMPCoSPhaseDigestInfoByDevice',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function uploadMPCoSPhaseDigestInfoByDevice(request: UploadMPCoSPhaseDigestInfoByDeviceRequest): UploadMPCoSPhaseDigestInfoByDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadMPCoSPhaseDigestInfoByDeviceWithOptions(request, runtime);
}

model UploadMPCoSPhaseTextInfoRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  dataKey?: string(name='DataKey', example='32bfce96b4e2f9bec0f2ea5cc2f14ace1486cc146d5832d3a84e5332fe89****'),
  dataSeq?: string(name='DataSeq', example='be350cd52b0f47846f93df7d0d4febd86025ee6c028a6b22a6ff1ac6d3a2****'),
  phaseData?: string(name='PhaseData', example='987823074334****'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
  phaseId?: string(name='PhaseId', example='196487512811****'),
  relatedDataList?: map[string]any(name='RelatedDataList'),
}

model UploadMPCoSPhaseTextInfoShrinkRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  dataKey?: string(name='DataKey', example='32bfce96b4e2f9bec0f2ea5cc2f14ace1486cc146d5832d3a84e5332fe89****'),
  dataSeq?: string(name='DataSeq', example='be350cd52b0f47846f93df7d0d4febd86025ee6c028a6b22a6ff1ac6d3a2****'),
  phaseData?: string(name='PhaseData', example='987823074334****'),
  phaseGroupId?: string(name='PhaseGroupId', example='383860792287****'),
  phaseId?: string(name='PhaseId', example='196487512811****'),
  relatedDataListShrink?: string(name='RelatedDataList'),
}

model UploadMPCoSPhaseTextInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model UploadMPCoSPhaseTextInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UploadMPCoSPhaseTextInfoResponseBody(name='body'),
}

async function uploadMPCoSPhaseTextInfoWithOptions(tmpReq: UploadMPCoSPhaseTextInfoRequest, runtime: Util.RuntimeOptions): UploadMPCoSPhaseTextInfoResponse {
  Util.validateModel(tmpReq);
  var request = new UploadMPCoSPhaseTextInfoShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.relatedDataList)) {
    request.relatedDataListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.relatedDataList, 'RelatedDataList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.dataKey)) {
    query['DataKey'] = request.dataKey;
  }
  if (!Util.isUnset(request.dataSeq)) {
    query['DataSeq'] = request.dataSeq;
  }
  if (!Util.isUnset(request.phaseData)) {
    query['PhaseData'] = request.phaseData;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  if (!Util.isUnset(request.phaseId)) {
    query['PhaseId'] = request.phaseId;
  }
  if (!Util.isUnset(request.relatedDataListShrink)) {
    query['RelatedDataList'] = request.relatedDataListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UploadMPCoSPhaseTextInfo',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function uploadMPCoSPhaseTextInfo(request: UploadMPCoSPhaseTextInfoRequest): UploadMPCoSPhaseTextInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadMPCoSPhaseTextInfoWithOptions(request, runtime);
}

model UploadMPCoSPhaseTextInfoByDeviceRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  dataKey?: string(name='DataKey', example='32bfce96b4e2f9bec0f2ea5cc2f14ace1486cc146d5832d3a84e5332fe89****'),
  dataSeq?: string(name='DataSeq', example='be350cd52b0f47846f93df7d0d4febd86025ee6c028a6b22a6ff1ac6d3a2****'),
  iotAuthType?: string(name='IotAuthType', example='ID2'),
  iotDataDigest?: string(name='IotDataDigest', example='94894989498FDDABD51698BD1A49BF1AFB0AA94FAA8DB65A689164BEED******'),
  iotId?: string(name='IotId', example='183329761572****'),
  iotIdServiceProvider?: string(name='IotIdServiceProvider', example='94894989498FDDABD51698BD1A49BF1AFB0AA94FAA8DB65A689164BEED******'),
  iotIdSource?: string(name='IotIdSource', example='2'),
  iotSignature?: string(name='IotSignature', example='2~2~192ADFB498AA****~1579198300000~J8E891NAgAhwHBHm8******/hnswr698HSb09ahS8709bn9s03jg98u4jg******'),
  phaseData?: string(name='PhaseData'),
  phaseGroupId?: string(name='PhaseGroupId', example='987823074334****'),
  phaseId?: string(name='PhaseId', example='644208887511****'),
  relatedDataList?: map[string]any(name='RelatedDataList'),
}

model UploadMPCoSPhaseTextInfoByDeviceShrinkRequest {
  apiVersion?: string(name='ApiVersion', example='1.0.0'),
  bizChainId?: string(name='BizChainId', example='489973087549****'),
  dataKey?: string(name='DataKey', example='32bfce96b4e2f9bec0f2ea5cc2f14ace1486cc146d5832d3a84e5332fe89****'),
  dataSeq?: string(name='DataSeq', example='be350cd52b0f47846f93df7d0d4febd86025ee6c028a6b22a6ff1ac6d3a2****'),
  iotAuthType?: string(name='IotAuthType', example='ID2'),
  iotDataDigest?: string(name='IotDataDigest', example='94894989498FDDABD51698BD1A49BF1AFB0AA94FAA8DB65A689164BEED******'),
  iotId?: string(name='IotId', example='183329761572****'),
  iotIdServiceProvider?: string(name='IotIdServiceProvider', example='94894989498FDDABD51698BD1A49BF1AFB0AA94FAA8DB65A689164BEED******'),
  iotIdSource?: string(name='IotIdSource', example='2'),
  iotSignature?: string(name='IotSignature', example='2~2~192ADFB498AA****~1579198300000~J8E891NAgAhwHBHm8******/hnswr698HSb09ahS8709bn9s03jg98u4jg******'),
  phaseData?: string(name='PhaseData'),
  phaseGroupId?: string(name='PhaseGroupId', example='987823074334****'),
  phaseId?: string(name='PhaseId', example='644208887511****'),
  relatedDataListShrink?: string(name='RelatedDataList'),
}

model UploadMPCoSPhaseTextInfoByDeviceResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The system is busy. Please try again later.'),
  requestId?: string(name='RequestId', example='D5C69894-9709-4653-B3D8-25234034C2FC'),
  success?: boolean(name='Success', example='true'),
}

model UploadMPCoSPhaseTextInfoByDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UploadMPCoSPhaseTextInfoByDeviceResponseBody(name='body'),
}

async function uploadMPCoSPhaseTextInfoByDeviceWithOptions(tmpReq: UploadMPCoSPhaseTextInfoByDeviceRequest, runtime: Util.RuntimeOptions): UploadMPCoSPhaseTextInfoByDeviceResponse {
  Util.validateModel(tmpReq);
  var request = new UploadMPCoSPhaseTextInfoByDeviceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.relatedDataList)) {
    request.relatedDataListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.relatedDataList, 'RelatedDataList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.apiVersion)) {
    query['ApiVersion'] = request.apiVersion;
  }
  if (!Util.isUnset(request.bizChainId)) {
    query['BizChainId'] = request.bizChainId;
  }
  if (!Util.isUnset(request.dataKey)) {
    query['DataKey'] = request.dataKey;
  }
  if (!Util.isUnset(request.dataSeq)) {
    query['DataSeq'] = request.dataSeq;
  }
  if (!Util.isUnset(request.iotAuthType)) {
    query['IotAuthType'] = request.iotAuthType;
  }
  if (!Util.isUnset(request.iotDataDigest)) {
    query['IotDataDigest'] = request.iotDataDigest;
  }
  if (!Util.isUnset(request.iotId)) {
    query['IotId'] = request.iotId;
  }
  if (!Util.isUnset(request.iotIdServiceProvider)) {
    query['IotIdServiceProvider'] = request.iotIdServiceProvider;
  }
  if (!Util.isUnset(request.iotIdSource)) {
    query['IotIdSource'] = request.iotIdSource;
  }
  if (!Util.isUnset(request.iotSignature)) {
    query['IotSignature'] = request.iotSignature;
  }
  if (!Util.isUnset(request.phaseData)) {
    query['PhaseData'] = request.phaseData;
  }
  if (!Util.isUnset(request.phaseGroupId)) {
    query['PhaseGroupId'] = request.phaseGroupId;
  }
  if (!Util.isUnset(request.phaseId)) {
    query['PhaseId'] = request.phaseId;
  }
  if (!Util.isUnset(request.relatedDataListShrink)) {
    query['RelatedDataList'] = request.relatedDataListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UploadMPCoSPhaseTextInfoByDevice',
    version = '2019-05-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function uploadMPCoSPhaseTextInfoByDevice(request: UploadMPCoSPhaseTextInfoByDeviceRequest): UploadMPCoSPhaseTextInfoByDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadMPCoSPhaseTextInfoByDeviceWithOptions(request, runtime);
}

